package com.alks.pad.mapper.stitchAccount;

import com.alks.entity.data.entity.PadStitchLog;
import com.alks.entity.data.entity.PcStitchLotPriceDetail;
import com.alks.entity.data.entity.PcStitchProdDetail;
import com.alks.pad.data.dto.stitch.PcStitchProdDetailDto3;
import com.alks.pad.data.dto.stitch.StitchInventoryDetailDto;
import com.alks.pad.data.dto.stitch.StitchInventoryDto;
import com.alks.pad.data.dto.stitch.StitchProducedSalaryDto;
import com.alks.pad.data.request.stitchAccount.PcStitchProdDetailRequest1;
import com.alks.pad.data.request.stitchAccount.ProducedValueRequest;
import com.alks.pad.data.request.stitchAccount.StitchInventoryDetailDRequest;
import com.alks.pad.data.request.stitchAccount.StitchInventoryRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface StitchMapper {

    /*员工在当前月不同日的缴库日期的工资*/
    List<StitchProducedSalaryDto> getEmployeeDailySalary(@Param("companyId") String companyId, @Param("request") ProducedValueRequest request);

    /*当月所有缴库日期每个人的总工资*/
    List<StitchProducedSalaryDto> getProducedValue(@Param("companyId") String companyId, @Param("request") ProducedValueRequest request);

    /*查询员工当日工序工资*/
    List<StitchProducedSalaryDto> getEmployeeDailyProcessSalary(@Param("companyId") String companyId, @Param("request") ProducedValueRequest request);

    /*待报产指令查询*/
    List<StitchInventoryDto> getNotReportProductDetails(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest request);
    List<StitchInventoryDto> getNotReportProductDetails2(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest request);

    /*待报工序查询*/
    List<StitchInventoryDetailDto> getNotReportProcessDetails(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest request);

    /*根据指令查待报工序查询*/
    List<StitchInventoryDetailDto> getNotReportProcessDetailsByLotNo(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest r);
    List<StitchInventoryDetailDto> getNotReportProcessDetailsByLotNo2(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest r);

    /*查询该指令对应的工序可以报产数量*/
    StitchInventoryDetailDto getNotReportProcessDetailsByLotNo3(@Param("companyId") String companyId, @Param("request") StitchInventoryDetailDRequest r);

    /*查询该指令所有的工序可以报产数量*/
    List<StitchInventoryDetailDto> getNotReportProcessDetailsByLotNo4(@Param("companyId") String companyId, @Param("request") StitchInventoryDetailDRequest r);

    /*根据具体信息单个查已报工序*/
    StitchInventoryDetailDto getReportProcessDetailsByProcess(@Param("companyId") String companyId, @Param("request") StitchInventoryDetailDto dto);

    /*已报工序查询*/
    List<StitchInventoryDetailDto> getReportProcessDetails(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest request);

    /*道序报产*/
    int addBatchPcStitchProdDetail( @Param("list") List<PcStitchProdDetail> detail);

    /*单个道序报产*/
    int addPcStitchProdDetail(@Param("request") PcStitchProdDetail detail);

    /*已经报产工序删除*/
    int deleteReportProcess(@Param("companyId") String companyId, @Param("request") StitchInventoryDetailDto request);

    /*当日已报产指令对应的完成数量和*/
    List<StitchInventoryDto> getReportProductDetails(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest request);

    List<StitchInventoryDto> getReportProductDetails2(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest request);

    List<StitchInventoryDto> getReportProductDetails3(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest request);

    /*通过指令去查这些指令完成数量*/
    List<StitchInventoryDto> getReportProductDetailsByLotNos(@Param("companyId") String companyId, @Param("list") List<StitchInventoryDto> list1);

    /*根据完成库里面的指令去当日已完成查他原本的数量*/
    List<StitchInventoryDto> getNotReportProductDetailsByLotNos(@Param("companyId") String companyId, @Param("list") List<StitchInventoryDto> list2);

    List<StitchInventoryDto> getNotReportProductDetailsByLotNos2(@Param("companyId") String companyId, @Param("list") List<StitchInventoryDto> list2);

    /*先查这个指令有没有工序建档*/
    List<PcStitchLotPriceDetail> getPcStitchLotPriceDetail(@Param("companyId") String companyId, @Param("request") StitchInventoryRequest request);

    /*针车写入日志*/
    void addPadStitchLog(PadStitchLog log);

    /*查询页面上的统计数量*/
    List<PcStitchProdDetailDto3> getPcStitchProdDetailList(PcStitchProdDetailRequest1 request);

    /*查询页面上的的统计数量*/
    Integer getPcStitchProdDetailOfQtyCount(PcStitchProdDetailRequest1 request);

    /*更新 PcStitchProdDetail 版本号*/
    void updatePcStitchProdDetailVersion(PcStitchProdDetail detail);

    /*批量更新 PcStitchProdDetail 版本号*/
    void updateBatchPcStitchProdDetailVersion(List<PcStitchProdDetail> list);
}
